package com.bdqn.t382.sz.Text2;

import com.bdqn.t382.sz.Text1.Calculator;

public class Modulus implements Calculator {
    @Override
    public double calculate(double num1, double num2) {
        if (num2 == 0) {
            throw new IllegalArgumentException("除数不能为零");
        }
        return num1 % num2;
    }
}
